Fix residual blog metadata from Ahrefs audit#7894
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughChangesBlog SEO and locale handling
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)SEO metadata flowsequenceDiagram
participant BlogPage
participant blogPostSeoCopy
participant TranslationNamespaces
participant BlogSchema
BlogPage->>TranslationNamespaces: load post and meta messages
BlogPage->>blogPostSeoCopy: build title and description
blogPostSeoCopy->>TranslationNamespaces: read audited candidate fields
BlogPage->>BlogSchema: pass seoKey and published metadata
BlogSchema->>blogPostSeoCopy: resolve structured-data copy
Fallback locale negotiationsequenceDiagram
participant Request
participant fallbackContentRequestForPathname
participant preferredFallbackContentLocale
participant setFallbackContentLinkHeader
Request->>fallbackContentRequestForPathname: match pathname to fallback route
fallbackContentRequestForPathname-->>Request: return available locales
Request->>preferredFallbackContentLocale: negotiate against available locales
preferredFallbackContentLocale-->>Request: select fallback locale
Request->>setFallbackContentLinkHeader: pass available locales
setFallbackContentLinkHeader-->>Request: build alternate links
🚥 Pre-merge checks | ✅ 24 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (24 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 210b427. Configure here.
Greptile SummaryThis PR aligns SEO metadata and locale availability across blog and landing pages. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (18): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 210b427261
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
e3f39cd to
0a06001
Compare
0a06001 to
95ed223
Compare
e4f99ab to
3ad6e78
Compare
3ad6e78 to
77287a0
Compare
540152d to
17ee4df
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@web/messages/tr.json`:
- Line 631: Update the metaDescription translation to distinguish unconditional
layout restoration from conditional agent-session resumption, stating that agent
sessions are restored only when supported integrations, hooks, and native
session IDs are available. Preserve the existing cmux restart and crash-recovery
context without implying all listed agents are always resumed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 8b0a9775-a330-45ba-8d08-862f385dcacc
📒 Files selected for processing (30)
web/app/[locale]/(landing)/blog/blog-schema.tsxweb/app/[locale]/(landing)/blog/claude-code-best-worktree-manager/page.tsxweb/app/[locale]/(landing)/blog/cmd-shift-u/page.tsxweb/app/[locale]/(landing)/blog/cmux-claude-teams/page.tsxweb/app/[locale]/(landing)/blog/cmux-home/page.tsxweb/app/[locale]/(landing)/blog/cmux-omo/page.tsxweb/app/[locale]/(landing)/blog/cmux-ssh/page.tsxweb/app/[locale]/(landing)/blog/gpl/page.tsxweb/app/[locale]/(landing)/blog/introducing-cmux/page.tsxweb/app/[locale]/(landing)/blog/page.tsxweb/app/[locale]/(landing)/blog/passkey-auth/page.tsxweb/app/[locale]/(landing)/blog/session-restore/page.tsxweb/app/[locale]/(landing)/blog/show-hn-launch/page.tsxweb/app/[locale]/(landing)/blog/unread-shortcuts/page.tsxweb/app/[locale]/(landing)/blog/zen-of-cmux/page.tsxweb/app/[locale]/(landing)/guides/page.tsxweb/app/[locale]/(landing)/nightly/page.tsxweb/app/[locale]/components/blog-pager.tsxweb/app/[locale]/components/blog-posts.tsweb/app/lib/agent-page-paths.tsweb/app/sitemap.tsweb/i18n/audited-seo.tsweb/i18n/locale-availability.tsweb/messages/bs.jsonweb/messages/en.jsonweb/messages/th.jsonweb/messages/tr.jsonweb/proxy.tsweb/tests/agent-page-variants.test.tsweb/tests/seo.test.ts
| }, | ||
| "sessionRestore": { | ||
| "metaDescription": "cmux ile yeniden başlatma veya terminal çökmesinden sonra Claude Code, Codex, OpenCode, Gemini CLI, Antigravity CLI, Grok Build CLI ve diğer kodlama agent oturumlarını geri yükleme.", | ||
| "metaDescription": "cmux, yeniden başlatma veya terminal çökmesinden sonra Claude Code, Codex, OpenCode ve diğer kodlama ajanlarının düzenlerini ve oturumlarını geri yükler.", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Qualify agent-session restoration in the metadata.
This description implies that cmux unconditionally restores all listed agent sessions. Session restoration actually depends on supported integrations, hooks, and native session IDs; distinguish layout restoration from conditional agent resumption.
Proposed wording
- "metaDescription": "cmux, yeniden başlatma veya terminal çökmesinden sonra Claude Code, Codex, OpenCode ve diğer kodlama ajanlarının düzenlerini ve oturumlarını geri yükler.",
+ "metaDescription": "cmux, yeniden başlatma veya terminal çökmesinden sonra düzenleri geri yükler; desteklenen Claude Code, Codex, OpenCode ve diğer kodlama ajanlarının oturumlarını hooks ile sürdürür.",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "metaDescription": "cmux, yeniden başlatma veya terminal çökmesinden sonra Claude Code, Codex, OpenCode ve diğer kodlama ajanlarının düzenlerini ve oturumlarını geri yükler.", | |
| "metaDescription": "cmux, yeniden başlatma veya terminal çökmesinden sonra düzenleri geri yükler; desteklenen Claude Code, Codex, OpenCode ve diğer kodlama ajanlarının oturumlarını hooks ile sürdürür.", |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@web/messages/tr.json` at line 631, Update the metaDescription translation to
distinguish unconditional layout restoration from conditional agent-session
resumption, stating that agent sessions are restored only when supported
integrations, hooks, and native session IDs are available. Preserve the existing
cmux restart and crash-recovery context without implying all listed agents are
always resumed.
# Conflicts: # web/i18n/audited-seo.ts # web/tests/seo.test.ts
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
web/tests/seo.test.ts (1)
1152-1166: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
plainSeoMessageLookup's colon-lead-in guard is missing the Khmer colon (៖).The production filter in
selectDescription(web/i18n/audited-seo.ts) treats/[::៖]\s*$/uas a list lead-in, but this test helper only checks/[::]\s*$/u. A Khmer blog-post field ending in៖would silently pass this guard instead of failing the "list lead-in requested as prose" check, even though the codebase elsewhere (e.g. this same file'skmtests at lines 119, 628) explicitly exercises Khmer punctuation handling.if (/[::]\s*$/u.test(value)) { throw new Error(
SEO metadata requested list lead-in ${key} as prose); } return value;🩹 Proposed fix
- if (/[::]\s*$/u.test(value)) { + if (/[::៖]\s*$/u.test(value)) { throw new Error(`SEO metadata requested list lead-in ${key} as prose`); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/tests/seo.test.ts` around lines 1152 - 1166, Update the colon-lead-in check in plainSeoMessageLookup to include the Khmer colon alongside the existing ASCII and fullwidth colon characters, matching selectDescription’s /[::៖]\s*$/u behavior while preserving the current error handling.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@web/tests/seo.test.ts`:
- Around line 1152-1166: Update the colon-lead-in check in plainSeoMessageLookup
to include the Khmer colon alongside the existing ASCII and fullwidth colon
characters, matching selectDescription’s /[::៖]\s*$/u behavior while preserving
the current error handling.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: c639bed1-5e43-4213-9acd-5c211c585336
📒 Files selected for processing (5)
web/i18n/audited-seo.tsweb/messages/bs.jsonweb/messages/th.jsonweb/messages/tr.jsonweb/tests/seo.test.ts

Stacked on #7888.
Selects complete, route-specific metadata for 11 blog families,
/nightly, and/guidesacross published locales. HTML, Open Graph, Twitter, and article schema use the same selected copy. English-onlycmux-omoandgplURLs now canonicalize instead of publishing fallback duplicates.Tests:
bun test(591 passed, 91 skipped),bun run typecheck, changed-file ESLint.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Medium Risk
Broad SEO and i18n routing changes affect canonical URLs, hreflang, and which locales can access several blog paths; mistakes could cause wrong redirects or indexing, but behavior is heavily tested.
Overview
Addresses residual Ahrefs blog SEO by routing 11 blog posts plus
/nightlyand/guidesthrough shared audited helpers (blogPostSeoCopy,landingPageSeoCopy) so HTML metadata, Open Graph, Twitter, and article JSON-LD (BlogSchema+seoKey) use the same selected titles and descriptions, withtitle: { absolute: ... }on audited posts.Locale availability is tightened for partially translated blogs:
cmux-claude-teams,cmux-omo, andgplare English-only;cmux-sshstays en/ja. That registry drivesbuildAlternates, middleware redirects/canonical rewrites,Linkhreflang headers, sitemap entries,blogPostsForLocale(index + pager), and agent.md/.txtvariants so unsupported locales no longer surface duplicate or fallback URLs.Adds
blogPostSeoCopywith per-post prose candidate keys,landingPageSeoCopyfor landing pages, and small message tweaks in a few locales; tests cover navigation filtering, alternates, middleware, sitemap, and agent variants.Reviewed by Cursor Bugbot for commit e34583a. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Fixes residual blog SEO from the Ahrefs audit. Unifies metadata for 11 posts plus
/nightlyand/guides, enforces plain‑text titles/descriptions, and limits alternates, sitemap, navigation, agent variants, and routing to authored locales.blogPostSeoCopy; settitle: { absolute: ... }; passseoKeytoBlogSchemaso JSON‑LD uses the same audited copy.landingPageSeoCopyfor/nightlyand/guideswith complete prose and page context./blog/cmux-claude-teams,/blog/cmux-omo,/blog/gplareen‑only viaenglishFallbackContentLocales;/blog/cmux-sshisen/ja.buildAlternates/Linkheaders, sitemap entries, agent‑readable variants, blog index, and pager expose only authored locales; middleware negotiates allowed locales per route, rewrites canonical routes, and 301s others.en,bs,th,tr; tests cover alternates, sitemap, blog discovery, canonicalization, agent‑page variants, and punctuation rules.Written for commit e34583a. Summary will update on new commits.
Summary by CodeRabbit
New Features
Bug Fixes
Content
Tests